package lesson01.oop;

public class Person {
	public String name;
	public void eatMeat(Meat p_meat) {
		System.out.print(name + "吃");

		// 调用的是真实对象子类覆盖的方法
		p_meat.show();
	}
}
class Meat {
	public void show() {
		System.out.println("@肉@");
	}
}
class 羊肉 extends Meat {
	public void show() {
		System.out.println("@羊肉@");
	}
}
class 牛肉  extends Meat{
	public void show() {
		System.out.println("@牛肉@");
	}
}
